<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<meta name="generator" content="JsDoc Toolkit" />
		
		<title>JsDoc Reference - JSC3D.BinaryStream</title>

		<style type="text/css">
			/* default.css */


body
{
	font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
	width: 800px;
}

.header
{
	clear: both;
	background-color: #ccc;
	padding: 8px;
}

h1
{
	font-size: 150%;
	font-weight: bold;
	padding: 0;
	margin: 1em 0 0 .3em;
}

hr
{
	border: none 0;
	border-top: 1px solid #7F8FB1;
	height: 1px;
}

pre.code
{
	display: inline;
//	padding: 8px;
//	border: 1px dashed #ccc;
	background-color: #4AA02C;
}

#index
{
	margin-top: 24px;
	float: left;
	width: 160px;
	position: absolute;
	left: 8px;
	background-color: #F3F3F3;
	padding: 8px;
}

#content
{
	margin-left: 190px;
	width: 600px;
}

.classList
{
	list-style-type: none;
	padding: 0;
	margin: 0 0 0 8px;
	font-family: arial, sans-serif;
	font-size: 1em;
	overflow: auto;
}

.classList li
{
	padding: 0;
	margin: 0 0 8px 0;
}

.summaryTable { width: 100%; }

h1.classTitle
{
	font-size:170%;
	line-height:130%;
}

h2 { font-size: 110%; }
caption, div.sectionTitle
{
	background-color: #7F8FB1;
	color: #fff;
	font-size:130%;
	text-align: left;
	padding: 2px 6px 2px 6px;
	border: 1px #7F8FB1 solid;
}

div.sectionTitle { margin-bottom: 8px; }
.summaryTable thead { display: none; }

.summaryTable td
{
	vertical-align: top;
	padding: 4px;
	border-bottom: 1px #7F8FB1 solid;
	border-right: 1px #7F8FB1 solid;
}

/*col#summaryAttributes {}*/
.summaryTable td.attributes
{
	border-left: 1px #7F8FB1 solid;
	width: 140px;
	text-align: right;
}

td.attributes, .fixedFont
{
	line-height: 15px;
	color: #002EBE;
	font-family: "Courier New",Courier,monospace;
	font-size: 13px;
}

.summaryTable td.nameDescription
{
	text-align: left;
	font-size: 13px;
	line-height: 15px;
}

.summaryTable td.nameDescription, .description
{
	line-height: 15px;
	padding: 4px;
	padding-left: 4px;
}

.summaryTable { margin-bottom: 8px; }

ul.inheritsList
{
	list-style: square;
	margin-left: 20px;
	padding-left: 0;
}

.detailList {
	margin-left: 20px; 
	line-height: 15px;
}
.detailList dt { margin-left: 20px; }

.detailList .heading
{
	font-weight: bold;
	padding-bottom: 6px;
	margin-left: 0;
}

.light, td.attributes, .light a:link, .light a:visited
{
	color: #777;
	font-style: italic;
}

.fineprint
{
	text-align: right;
	font-size: 10px;
}
		</style>
	</head>

	<body>
<!-- ============================== header ================================= -->	
		<!-- begin static/header.html -->
		<div id="header">
</div>
		<!-- end static/header.html -->

<!-- ============================== classes index ============================ -->
		<div id="index">
			<!-- begin publish.classesIndex -->
			<div align="center"><a href="../index.html">Class Index</a>
| <a href="../files.html">File Index</a></div>
<hr />
<h2>Classes</h2>
<ul class="classList">
	
	<li><i><a href="../symbols/_global_.html">_global_</a></i></li>
	
	<li><a href="../symbols/JSC3D.html">JSC3D</a></li>
	
	<li><a href="../symbols/JSC3D.AABB.html">JSC3D.AABB</a></li>
	
	<li><a href="../symbols/JSC3D.BinaryStream.html">JSC3D.BinaryStream</a></li>
	
	<li><a href="../symbols/JSC3D.LoaderSelector.html">JSC3D.LoaderSelector</a></li>
	
	<li><a href="../symbols/JSC3D.Material.html">JSC3D.Material</a></li>
	
	<li><a href="../symbols/JSC3D.Math3D.html">JSC3D.Math3D</a></li>
	
	<li><a href="../symbols/JSC3D.Matrix3x4.html">JSC3D.Matrix3x4</a></li>
	
	<li><a href="../symbols/JSC3D.Mesh.html">JSC3D.Mesh</a></li>
	
	<li><a href="../symbols/JSC3D.ObjLoader.html">JSC3D.ObjLoader</a></li>
	
	<li><a href="../symbols/JSC3D.PickInfo.html">JSC3D.PickInfo</a></li>
	
	<li><a href="../symbols/JSC3D.Scene.html">JSC3D.Scene</a></li>
	
	<li><a href="../symbols/JSC3D.StlLoader.html">JSC3D.StlLoader</a></li>
	
	<li><a href="../symbols/JSC3D.Texture.html">JSC3D.Texture</a></li>
	
	<li><a href="../symbols/JSC3D.Viewer.html">JSC3D.Viewer</a></li>
	
</ul>
<hr />
			<!-- end publish.classesIndex -->
		</div>
		
		<div id="content">
<!-- ============================== class title ============================ -->
			<h1 class="classTitle">
				
				Class JSC3D.BinaryStream
			</h1>

<!-- ============================== class summary ========================== -->			
			<p class="description">
				
			
				BinaryStream
	The helper class to parse data from a binary stream.
				
				
					<br /><i>Defined in: </i> <a href="../symbols/src/jsc3d.js.html">jsc3d.js</a>.
				
			</p>

<!-- ============================== constructor summary ==================== -->			
			
			<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class JSC3D.BinaryStream.">
				<caption>Class Summary</caption>
				<thead>
					<tr>
						<th scope="col">Constructor Attributes</th>
						<th scope="col">Constructor Name and Description</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td class="attributes">&nbsp;</td>
						<td class="nameDescription" >
							<div class="fixedFont">
								<b><a href="../symbols/JSC3D.BinaryStream.html">JSC3D.BinaryStream</a></b>(data, isBigEndian)
							</div>
							<div class="description"></div>
						</td>
					</tr>
				</tbody>
			</table>
			

<!-- ============================== properties summary ===================== -->
			

<!-- ============================== methods summary ======================== -->
			
				
				
				<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class JSC3D.BinaryStream.">
					<caption>Method Summary</caption>
					<thead>
						<tr>
							<th scope="col">Method Attributes</th>
							<th scope="col">Method Name and Description</th>
						</tr>
					</thead>
					<tbody>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/JSC3D.BinaryStream.html#available">available</a></b>()
								</div>
								<div class="description">Get count of the remaining bytes in the stream.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/JSC3D.BinaryStream.html#eof">eof</a></b>()
								</div>
								<div class="description">See if the position indicator is already at the end of the stream.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/JSC3D.BinaryStream.html#readBytes">readBytes</a></b>(buffer, bytesToRead)
								</div>
								<div class="description">Read a piece of the stream into a given buffer.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/JSC3D.BinaryStream.html#readFloat32">readFloat32</a></b>()
								</div>
								<div class="description">Read a 32-bits' (IEEE 754) floating point number.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/JSC3D.BinaryStream.html#readFloat64">readFloat64</a></b>()
								</div>
								<div class="description">Read a 64-bits' (IEEE 754) floating point number.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/JSC3D.BinaryStream.html#readInt16">readInt16</a></b>()
								</div>
								<div class="description">Read a 16-bits' signed int number.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/JSC3D.BinaryStream.html#readInt32">readInt32</a></b>()
								</div>
								<div class="description">Read a 32-bits' signed int number.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/JSC3D.BinaryStream.html#readInt8">readInt8</a></b>()
								</div>
								<div class="description">Read an 8-bits' signed int number.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/JSC3D.BinaryStream.html#readUInt16">readUInt16</a></b>()
								</div>
								<div class="description">Read a 16-bits' unsigned int number.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/JSC3D.BinaryStream.html#readUInt32">readUInt32</a></b>()
								</div>
								<div class="description">Read a 32-bits' unsigned int number.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/JSC3D.BinaryStream.html#readUInt8">readUInt8</a></b>()
								</div>
								<div class="description">Read an 8-bits' unsigned int number.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/JSC3D.BinaryStream.html#reset">reset</a></b>()
								</div>
								<div class="description">Reset the position indicator to the beginning of the stream.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/JSC3D.BinaryStream.html#seek">seek</a></b>(position)
								</div>
								<div class="description">Set the position indicator of the stream to a new position.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/JSC3D.BinaryStream.html#size">size</a></b>()
								</div>
								<div class="description">Get the full length (in bytes) of the stream.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/JSC3D.BinaryStream.html#skip">skip</a></b>(bytesToSkip)
								</div>
								<div class="description">Advance the position indicator to skip a given number of bytes.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont"><b><a href="../symbols/JSC3D.BinaryStream.html#tell">tell</a></b>()
								</div>
								<div class="description">Get the current position indicator of the stream.</div>
							</td>
						</tr>
					
					</tbody>
				</table>
				
				
				
			
<!-- ============================== events summary ======================== -->
			

<!-- ============================== constructor details ==================== -->		
			
			<div class="details"><a name="constructor"> </a>
				<div class="sectionTitle">
					Class Detail
				</div>
				
				<div class="fixedFont">
						<b>JSC3D.BinaryStream</b>(data, isBigEndian)
				</div>
				
				<div class="description">
					
					
				</div>
				
				
				
				
					
						<dl class="detailList">
						<dt class="heading">Parameters:</dt>
						
							<dt>
								 <b>data</b>
								
							</dt>
								<dd></dd>
						
							<dt>
								 <b>isBigEndian</b>
								
							</dt>
								<dd></dd>
						
						</dl>
					
					
					
					
					
					
					

			</div>
			

<!-- ============================== field details ========================== -->		
			

<!-- ============================== method details ========================= -->		
			
				<div class="sectionTitle">
					Method Detail
				</div>
				
					<a name="available"> </a>
					<div class="fixedFont">
					
					<span class="light">{Number}</span>
					<b>available</b>()
					
					</div>
					<div class="description">
						Get count of the remaining bytes in the stream.
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Number}</span> the number of bytes from current position to the end of the stream.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="eof"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>eof</b>()
					
					</div>
					<div class="description">
						See if the position indicator is already at the end of the stream.
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> true if the position indicator is at the end of the stream; false if not.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="readBytes"> </a>
					<div class="fixedFont">
					
					<span class="light">{Number}</span>
					<b>readBytes</b>(buffer, bytesToRead)
					
					</div>
					<div class="description">
						Read a piece of the stream into a given buffer.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Array}</span> <b>buffer</b>
									
								</dt>
								<dd>the buffer to receive the result.</dd>
							
								<dt>
									<span class="light fixedFont">{Number}</span> <b>bytesToRead</b>
									
								</dt>
								<dd>length of the piece to be read, in bytes.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Number}</span> the total number of bytes that are successfully read.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="readFloat32"> </a>
					<div class="fixedFont">
					
					<span class="light">{Number}</span>
					<b>readFloat32</b>()
					
					</div>
					<div class="description">
						Read a 32-bits' (IEEE 754) floating point number.
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Number}</span> a 32-bits' floating point number, or NaN if any error occured.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="readFloat64"> </a>
					<div class="fixedFont">
					
					<span class="light">{Number}</span>
					<b>readFloat64</b>()
					
					</div>
					<div class="description">
						Read a 64-bits' (IEEE 754) floating point number.
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Number}</span> a 64-bits' floating point number, or NaN if any error occured.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="readInt16"> </a>
					<div class="fixedFont">
					
					<span class="light">{Number}</span>
					<b>readInt16</b>()
					
					</div>
					<div class="description">
						Read a 16-bits' signed int number.
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Number}</span> a 16-bits' signed int number, or NaN if any error occured.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="readInt32"> </a>
					<div class="fixedFont">
					
					<span class="light">{Number}</span>
					<b>readInt32</b>()
					
					</div>
					<div class="description">
						Read a 32-bits' signed int number.
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Number}</span> a 32-bits' signed int number, or NaN if any error occured.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="readInt8"> </a>
					<div class="fixedFont">
					
					<span class="light">{Number}</span>
					<b>readInt8</b>()
					
					</div>
					<div class="description">
						Read an 8-bits' signed int number.
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Number}</span> an 8-bits' signed int number, or NaN if any error occured.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="readUInt16"> </a>
					<div class="fixedFont">
					
					<span class="light">{Number}</span>
					<b>readUInt16</b>()
					
					</div>
					<div class="description">
						Read a 16-bits' unsigned int number.
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Number}</span> a 16-bits' unsigned int number, or NaN if any error occured.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="readUInt32"> </a>
					<div class="fixedFont">
					
					<span class="light">{Number}</span>
					<b>readUInt32</b>()
					
					</div>
					<div class="description">
						Read a 32-bits' unsigned int number.
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Number}</span> a 32-bits' unsigned int number, or NaN if any error occured.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="readUInt8"> </a>
					<div class="fixedFont">
					
					<span class="light">{Number}</span>
					<b>readUInt8</b>()
					
					</div>
					<div class="description">
						Read an 8-bits' unsigned int number.
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Number}</span> an 8-bits' unsigned int number, or NaN if any error occured.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="reset"> </a>
					<div class="fixedFont">
					
					
					<b>reset</b>()
					
					</div>
					<div class="description">
						Reset the position indicator to the beginning of the stream.
						
						
					</div>
					
					
					
						
						
						
						
						
						
						

					<hr />
				
					<a name="seek"> </a>
					<div class="fixedFont">
					
					<span class="light">{Boolean}</span>
					<b>seek</b>(position)
					
					</div>
					<div class="description">
						Set the position indicator of the stream to a new position.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Number}</span> <b>position</b>
									
								</dt>
								<dd>the new position.</dd>
							
							</dl>
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Boolean}</span> true if succeeded; false if the given position is out of range.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="size"> </a>
					<div class="fixedFont">
					
					<span class="light">{Number}</span>
					<b>size</b>()
					
					</div>
					<div class="description">
						Get the full length (in bytes) of the stream.
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Number}</span> the length of the stream.</dd>
							
							</dl>
						
						
						

					<hr />
				
					<a name="skip"> </a>
					<div class="fixedFont">
					
					
					<b>skip</b>(bytesToSkip)
					
					</div>
					<div class="description">
						Advance the position indicator to skip a given number of bytes.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Number}</span> <b>bytesToSkip</b>
									
								</dt>
								<dd>the number of bytes to skip.</dd>
							
							</dl>
						
						
						
						
						
						
						

					<hr />
				
					<a name="tell"> </a>
					<div class="fixedFont">
					
					<span class="light">{Number}</span>
					<b>tell</b>()
					
					</div>
					<div class="description">
						Get the current position indicator of the stream.
						
						
					</div>
					
					
					
						
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Returns:</dt>
							
								<dd><span class="light fixedFont">{Number}</span> current position in stream.</dd>
							
							</dl>
						
						
						

					
				
			
			
<!-- ============================== event details ========================= -->		
			
			
			<hr />
		</div>

		
<!-- ============================== footer ================================= -->
		<div class="fineprint" style="clear:both">
			
			Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Sat Oct 13 2012 19:21:53 GMT+0800 (CST)
		</div>
	</body>
</html>
